package ar.edu.uade.fain.ad.test.server.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name = "COORDINADORES")
@NamedQueries({
	@NamedQuery(name = "coordinador.enProyectoConFunciones", query = 
			"	SELECT DISTINCT i" +
			"	FROM Contrato c" +
			"	JOIN c.integrante i" +
			"	JOIN c.proyecto p" +
			"	JOIN p.funciones f" +
			"	WHERE i.sexo = :sexo" +
			"		AND i.class = Coordinador" +
			"		AND f.nombre IN (:funciones)" +
			"	")
})
public class Coordinador extends Integrante {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Column(name = "interino")
	private boolean interino;

	public Coordinador() {
		super();
	}

	public boolean isInterino() {
		return interino;
	}

	public void setInterino(boolean interino) {
		this.interino = interino;
	}

	@Override
	public String toString() {
		return "Coordinador [interino=" + interino + "]";
	}

}
